import request from '@/utils/request'

// 查询生成任务列表
export function listGentask(query) {
  return request({
    url: '/operation/gentask/list',
    method: 'get',
    params: query
  })
}

// 查询生成任务详细
export function getGentask(id) {
  return request({
    url: '/operation/gentask/' + id,
    method: 'get'
  })
}

// 新增生成任务
export function addGentask(data) {
  return request({
    url: '/operation/gentask',
    method: 'post',
    data: data
  })
}

// 修改生成任务
export function updateGentask(data) {
  return request({
    url: '/operation/gentask',
    method: 'put',
    data: data
  })
}

// 删除生成任务
export function delGentask(id) {
  return request({
    url: '/operation/gentask/' + id,
    method: 'delete'
  })
}

// 生成条状图tree
export function tree(dateEight) {
  return request({
    url: '/operation/gentask/tree/' + dateEight,
    method: 'get'
  })
}
